<template>
<div class="scroll-top"
 id="scroll-top"
  @click="scrollTop">
    <i class="icons4 icons4-to-top"></i>
</div>
</template>
<script>
export default{
    methods: {
        scrollTop() {
            document.body.scrollTop = 0;
        }
    }
}
</script>
<style>
.icons4-to-top{
    width: .4rem;
    height: .4rem;
    background-position: -1.6rem -2.66rem;
}
.scroll-top{
    opacity: 0;
}
</style>